package jaux.message.codec.example.message;

import jaux.message.codec.annotation.ByteMessageField;
import jaux.message.codec.annotation.DownlinkByteMessage;
import jaux.message.codec.annotation.SubBits;
import jaux.message.codec.annotation.SubBytes;
import jaux.message.codec.annotation.ToInt;

/**
 * 通知时间消息
 * @author huangdong
 *	
 */
@DownlinkByteMessage
public class NotifyTimeMessage {

	@ByteMessageField(encoder="setBits(toBits(),0,1,7,0)",decoder="toInt(range(0,1),7,0)")
	private Integer type;
	
	@ByteMessageField(encoder="setBits(toBits(),1,3,15,0)",decoder="toInt(range(1,3),15,0)")
	private Integer year;
	
	@ByteMessageField(encoder="setBits(toBits(),3,4,7,0)",decoder="toInt(get(3),7,0)")
	private Integer month;
	
	@ByteMessageField(encoder="setBits(toBits(),4,5,7,0)",decoder="toInt(get(4),7,0)")
	private Integer day;
	
	@ByteMessageField(encoder="setBits(toBits(),5,6,7,0)",decoder="toInt(get(5),7,0)")
	private Integer hour;
	
	@ByteMessageField(encoder="setBits(toBits(),6,7,7,0)",decoder="toInt(get(6),7,0)")
	private Integer minute;
	
	@ByteMessageField(encoder="setBits(toBits(),7,8,7,0)",decoder="toInt(get(7),7,0)")
	private Integer second;

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Integer getYear() {
		return year;
	}

	public void setYear(Integer year) {
		this.year = year;
	}

	public Integer getMonth() {
		return month;
	}

	public void setMonth(Integer month) {
		this.month = month;
	}

	public Integer getDay() {
		return day;
	}

	public void setDay(Integer day) {
		this.day = day;
	}

	public Integer getHour() {
		return hour;
	}

	public void setHour(Integer hour) {
		this.hour = hour;
	}

	public Integer getMinute() {
		return minute;
	}

	public void setMinute(Integer minute) {
		this.minute = minute;
	}

	public Integer getSecond() {
		return second;
	}

	public void setSecond(Integer second) {
		this.second = second;
	}
}
